import type { LoginData, Token } from '@/types/login'
import { http } from '@/utils/request'

// 登录时发送短信验证码
export const sendCodeApi = (mobile: string) => http(`/sms/codes/${mobile}`, 'get')

// 登录
export const loginApi = (data: LoginData) => http<Token>('/authorizations', 'post', data)
